package com.hqhy.like.front.order.dao.persist.repository.impl;

import com.hqhy.like.front.order.dao.persist.mapper.OrderDetailsMapper;
import com.hqhy.like.front.order.dao.persist.repository.IOrderDetailsRepository;
import com.hqhy.like.front.order.pojo.entity.OrderDetails;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

/**
 * 处理订单详情数据的存储库实现类
 */
@Repository
@Slf4j
public class OrderDetailsRepositoryImpl implements IOrderDetailsRepository {

    @Autowired
    private OrderDetailsMapper orderDetailsMapper;

    public OrderDetailsRepositoryImpl() {
        log.info("创建存储库对象：OrderDetailsRepositoryImpl");
    }

    @Override
    public int insert(OrderDetails orderDetails) {
        log.debug("开始处理【插入订单详情数据】的数据访问层，订单详情数据：{}", orderDetails);
        return orderDetailsMapper.insert(orderDetails);
    }
}
